if orders and not orders.TakeLimitTransaction then


function orders:TakeLimitTransaction(template)
	local transaction = self:LimitTransaction(template)
	
	if not transaction then return end
	
	if template.flags then
		if bit.test(template.flags, 2) then
			transaction.OPERATION = "S"
		else
			transaction.OPERATION = "B"
		end
	end
	
	transaction.PRICE = nil
	transaction["Move order"] = "Yes"
	transaction.EXPIRY_DATE = lib:FormatDate(false)		-- next year
	transaction["Expiration date"] = transaction.EXPIRY_DATE
	
	local p = template.ex__.tp
	if not p then p = template.ex__.condition_price end
	transaction.PRICE = lib:FormatPrice(p, template.ex__.instrument)
	
	self.log("TakeLimitTransaction", transaction)
		
	return transaction
end


end -- of file
